//
//  searchNull.m
//  OurTourism
//
//  Created by dllo on 15/12/2.
//  Copyright © 2015年 Devil_Coming. All rights reserved.
//

#import "searchNull.h"
#import "Header.h"
@interface searchNull ()
@property (nonatomic, retain)UILabel *label;
@end

@implementation searchNull
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor colorWithRed:0.98 green:0.97 blue:0.93 alpha:1];
 
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithImage:[[UIImage imageNamed:@"fanhui"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] style:UIBarButtonItemStylePlain target:self action:@selector(backToLast)];
    self.label = [[UILabel alloc]initWithFrame:CGRectMake(20, 0, WIDTH - 40, 60)];
    self.label.textColor = [UIColor darkGrayColor];
    self.label.center = self.view.center;
    self.label.numberOfLines = 2;
    self.label.textAlignment = NSTextAlignmentCenter;
    self.label.text = @"没有找到指定关键字";
    [self.view addSubview:self.label];
    [self creatDismiss];
}

#pragma mark - 视图将要出现 夜间模式
- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear: animated];
    
    
    if ([[NSUserDefaults standardUserDefaults]boolForKey:@"isNight"])
    {
        
        self.view.backgroundColor = [UIColor colorWithRed:0.28 green:0.28 blue:0.28 alpha:1];
        self.label.textColor = [UIColor whiteColor];
        
    }
    else
    {
        
        self.view.backgroundColor = [UIColor colorWithRed:0.98 green:0.97 blue:0.93 alpha:1];
        self.label.textColor = [UIColor darkGrayColor];
    }
    
    
    
}

- (void)creatDismiss
{
    
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
